WPF and Silverlight Edition Basic Library > FilePicker > FilePicker Features > Selection > Selecting Multiple Files |
FilePicker for WPF and Silverlight allows users to select multiple files at run time, though this option is not selected by default. At run time, users can only select one file at a time by default – you can allow users to select multiple files by setting the Multiselect property to True, for example see the steps below.
To set the Multiselect property add Multiselect="True" to the <c1:C1FilePicker> tag so that it appears similar to the following:
XAML |
Copy Code
|
---|---|
<c1:C1FilePicker HorizontalAlignment="Left" Margin="112,36,0,0" Name="C1FilePicker1" VerticalAlignment="Top" Width="161" Multiselect="True" /> |
To set the Multiselect property, add the following code to your project:
Visual Basic |
Copy Code
|
---|---|
Me.C1FilePicker1.Multiselect = True |
C# |
Copy Code
|
---|---|
this.c1FilePicker1.Multiselect = true;. |
To set the Multiselect property at design time, complete the following steps:
This will set the Multiselect property to allow users to select multiple files at run time in the OpenFileDialog dialog box.